/**
 * findByIds 时 _ids 参数传的是空，就直接返回一个空数组
 */
export default function findByIdsEmpty(next) {
	return rp => {
		const ids = rp.args._ids.filter(Boolean);
		if (!ids || !ids.length) return [];

		return next(rp).then(x => x.filter(Boolean));
	};
}
